using System.Collections.Generic;

namespace ArtheaEngine
{
    public abstract class Ability
    {
        public abstract string DamageNoun { get; }
        public abstract int Flags { get; }
        public abstract short Difficulty { get; }
        public abstract short WaitTime { get; }
        public string Name { get; protected set; }
        public abstract Dictionary<ClassType, short> Levels { get; }

        public abstract Position MinimumPosition { get; }

        public abstract decimal Cost { get; }
    }

    public abstract class Skill : Ability, ICommand
    {
        #region ICommand Members

        public bool CanUse(Character ch)
        {
            if (ch == null || !(ch is Player))
                return false;

            var p = ch as Player;

            if (p.Abilities.Get(Name) == -1)
            {
                return false;
            }
            if (Levels[p.Class] == 0 || Levels[p.Class] > ch.Level)
            {
                return false;
            }

            return true;
        }

        public abstract void Execute(Character ch, Argument argument);
        public string Description { get; protected set; }

        #endregion
    }

    public abstract class Spell : Ability
    {
    }

    public enum SpellTarget
    {
        Ignore,
        Defensive,
        Offensive,
        Self,
        Item,
        ItemOffensive,
        ItemDefensive,
        Direction
    }
}